package com.ruoyi.local.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.local.domain.SysAppSidemenu;
import com.ruoyi.local.service.ISysAppSidemenuService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/local/3Dearth/sidemenu")
public class SidemenuController extends BaseController {
    private String prefix = "local/3Dearth/";
    @Autowired
    private ISysAppSidemenuService sysAppSidemenuService;


    /**
     * 查询APP菜单权限树列表
     */
    @RequiresPermissions("local:appmenu:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list2(SysAppSidemenu sysAppSidemenu)
    {
        List<SysAppSidemenu> list = sysAppSidemenuService.selectSysAppSidemenuListvisible(sysAppSidemenu);
        return getDataTable(list);
    }
}
